package org.example.controller;

import org.example.service.NestedSkuService;
import org.example.service.SkuService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class SkuController {

    @Resource
    private SkuService skuService;

    @Resource
    private NestedSkuService nestedSkuService;

    @RequestMapping("/inset")
    public void inset() {
        nestedSkuService.inset();
//        skuService.inset();
    }

    @RequestMapping("/search")
    public void search() {
        nestedSkuService.searchByCategoryId();
        skuService.searchByCategoryId();
    }

    @RequestMapping("/batch")
    public void batch() {
        nestedSkuService.batch();
    }
}
